
import com.acmetelecom.BillingSystem;
import com.acmetelecom.Generator;
import com.acmetelecom.customer.Customer;
import com.acmetelecom.MoneyFormatter;

import java.util.List;


public class FakeGenerator implements Generator{
	
	private double bill;

	@Override
	public void send(Customer customer,
			List<com.acmetelecom.BillingSystem.LineItem> calls, String totalBill) {
		//System.out.println(customer.getFullName()/*+ " " +  customer.getPhoneNumber() + " " + customer.getPricePlan()*/);
        for (BillingSystem.LineItem call : calls) {
            System.out.println(/*call.date()+" "+call.callee()+" "+call.durationMinutes()+" "+*/MoneyFormatter.penceToPounds(call.cost()));
        	if(!MoneyFormatter.penceToPounds(call.cost()).equals("0.00"))
        		bill = Double.parseDouble(MoneyFormatter.penceToPounds(call.cost()));
        }
        //System.out.println(totalBill);
	}
	
	public double getBill()
	{
		return this.bill;
	}
}
